<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
			<title>会员权限管理</title>
			<link rel="stylesheet" type="text/css" href="../css/style1.css" />
			<link rel="stylesheet" type="text/css" href="../css/base.css" />
			<link rel="stylesheet" type="text/css" href="../css/indexbody.css" />
			<script type="text/javascript" src="../js/frame.js"></script>
			<script type="text/javascript">
	window.onload = function() {
		document.getElementById("hide").style.display = "none";
		document.getElementById("sc").style.display = "none";
		document.getElementById("vip").style.display = "block";
		document.getElementById("mb").style.display = "none";
		document.getElementById("sys").style.display = "none";
	}
</script>
	</head>
	<body background='../images/allbg.gif' leftmargin='8' topmargin='8'>
		<div id="container">
			<jsp:include page="../header.jsp"></jsp:include>
			<div style="float: left; width: 195px; height: 550px">
				<jsp:include page="../leftnav.jsp"></jsp:include>
			</div>
			<div
				style="float: left; overflow-y: scroll; overflow-x: hidden; width: 785px; height: 550px;">

				<form name="form1" action="<%=path %>//manager/vip/addUserTypeAction.action" method="post">
					<table width="98%" border="0" cellpadding="3" cellspacing="1"
						bgcolor="#D6D6D6" align="center">
						<tr height="28">
							<td colspan="6" background='../images/tbg.gif'>
								<strong><u>会员管理</u> &gt; 会员级别设置：</strong>
							</td>
						</tr>
						<tr bgcolor="#F8FCF1" height="24">
							<td colspan="6">
								<strong>级别名称和级别值：（注册会员这个级别不能删除，否则会员系统将会无法正常使用某些功能）</strong>
							</td>
						</tr>
						<tr bgcolor="#FDFEE9" height="24" align="center">
							<td width="20%" colspan="2">
								级别名称
							</td>
							<td width="15%" colspan="2">
								默认积分
							</td>
							<td width="16%" colspan="2">
								状态
							</td>
						</tr>

						<s:iterator value="userTypeList">
							<s:property value="" />
							<tr align="center" bgcolor="#FFFFFF" height="24">
								<td colspan="2">
									<input name="name_1" value="<s:property value="userType"/>"
										type="text" id="name_1" class='autoinput alltxt'
										readonly="readonly" />
								</td>
								<td colspan="2">
									<input name="scores_1" value="<s:property value="integral"/>"
										type="text" id="scores_1" class='autoinput alltxt'
										readonly="readonly" />
								</td>
								<s:if test='userType=="注册会员"'>
									<td colspan="2">
										<input name="check_1" type="checkbox" id="check_1"
											disabled="disabled" class="np"
											value="<s:property value="id"/>" checked='checked' />
										正在使用
									</td>
								</s:if>
								<s:else>
									<td colspan="2">
										<input name="check_1" type="checkbox" id="check_1" class="np"
											value="<s:property value="id"/>" checked='checked' />
										正在使用
									</td>
								</s:else>
							</tr>
						</s:iterator>
						<tr bgcolor="#F8FCF1" height="24">
							<td colspan="6">
								<strong>新增一个级别：</strong>(由于会员升级是以级别值由低向高升级的，因此增加组别时需注意此值的设置，
								<font color='red'><u>如果你增加新的会员组的级别值低于10，将自动被视为普通的注册会员。</u>
								</font>)
							</td>
						</tr>

						<tr bgcolor="#FFFFFF" align="center" height="24">
							<td colspan="2">
								级别名称
							</td>
							<td colspan="2">
								默认积分
							</td>
							<td>
								操作设置
							</td>
							<td>
								&nbsp;
							</td>
						</tr>
						<script type="text/javascript">
							function onChecked(){
								if (document.getElementById("check_new").checked==false) {
									document.getElementById("name_new").disabled="disabled";
									document.getElementById("scores_new").disabled="disabled";
								}
								if(document.getElementById("check_new").checked==true){
									document.getElementById("name_new").disabled="";
									document.getElementById("scores_new").disabled="";
								}
							}
						</script>
						<tr bgcolor="#FFFFFF" align="center" height="24">
							<td colspan="2">
								<input name="userType.userType" type="text" id="name_new"
									class='autoinput alltxt' />
							</td>
							<td colspan="2">
								<input name="userType.integral" type="text" id="scores_new" value=''
									class='autoinput alltxt'  />
							</td>
							<td>
								<input name="check_new" type="checkbox" id="check_new"
									class="np" value="1" checked="true" onclick="onChecked()" />
								增加等级
							</td>
							<td>
								&nbsp;
							</td>
						</tr>

						<tr>
							<td height="24" colspan="6" bgcolor="#F8FCF1">
								&nbsp;
							</td>
						</tr>
						<tr>
							<td height="36" colspan="6" align="center" bgcolor="#FFFFFF">
								<input name="imageField" type="image"
									src="../images/button_save.gif" width="60" height="22"
									border="0" class="np" />
							</td>
						</tr>

					</table>
				</form>
			</div>
		</div>
	</body>
</html>
